package thread;

public class Demo7 {
    public static void main(String[] args) {
        Thread  t = new Thread(()->{
            while(true){
                System.out.println("hello Thread");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        });
        t.start();
        System.out.println("线程id："+t.getId());
        System.out.println("线程name："+t.getName());
        System.out.println("线程状态："+t.getState());
        System.out.println("线程优先级："+t.getPriority());
    }
}
